Repository navigation
README: code that runs as copied, a quick start and C# tasks; NuGet packs the same README - #83
Merged
Merged
Conversation
…Get packs it - README.md: a quick start (dotnet add package, CONVERTAPI_TOKEN, a 6-line program on a hosted sample), a task table, "... in C#" sections for 8 tasks, every snippet a complete program that saves to a relative output folder it creates, ConvertApiFile, FitToSize, the current converter names, the 401, 403 and 503 codes, and a security, data and support section. - ConvertApi.csproj packs the root README.md; the drifted ConvertApi/docs/README.md is deleted. - publish.yml rewrites utm_source=github to utm_source=nuget in the packed copy and fails if the packed README.md is missing or still says github. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the documentation and shared README packaging changes.
No open issues 🎉
What changed in this PR
Improves the .NET SDK’s onboarding documentation and uses one README for both GitHub and NuGet, without changing SDK implementation code.
Changes:
- Adds a quick start, task navigation, complete C# conversion examples, and security guidance.
- Packages the repository README and removes the separate NuGet copy.
- Updates publishing to retag README links for NuGet and validate the packaged README.
| File | Description |
|---|---|
RELEASING.md |
Documents the shared README and NuGet link tagging. |
README.md |
Reworks setup, task examples, error handling, and security guidance. |
ConvertApi/docs/README.md |
Removes the duplicated NuGet README. |
ConvertApi/ConvertApi.csproj |
Packs the repository README at the package root. |
CHANGELOG.md |
Records the documentation and packaging changes. |
.github/workflows/publish.yml |
Retags links and checks the packaged README before publishing. |
Review effort: Balanced
Brings in #84: SaveFileAsync replaces a longer file, SaveFilesAsync creates its folder, and unit tests run in the build check. The only conflict was CHANGELOG.md, where both branches opened [Unreleased]. It is now one section: #84's Fixed entry, then one Changed list with #84's entries first and this branch's after them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 9, 2026
…t net10.0 The README said a program started from Visual Studio runs in bin\Debug\net10.0. That holds only for a .NET 10 project with default settings: the README also covers .NET 5 to 9, .NET Core and .NET Framework, whose output folders differ, and the debug launch profile can set another working directory. The note now names the launch profile's working directory and gives the build output folder as its default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kostas-jonauskas
approved these changes
Nov 9, 2026
This was referenced Nov 9, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Rewrites
README.mdso its code runs as copied, adds a quick start and a free-token link, uses C# task wording, and makes the repository README the one that nuget.org shows. No SDK code changes; those come in 3.3.0.What changes
README.md: new top, a quick start, a task table, "... in C#" sections for 8 tasks, every snippet a complete program, a security section. Details below.ConvertApi/ConvertApi.csprojpacks../README.mdasREADME.md. The driftedConvertApi/docs/README.mdis deleted..github/workflows/publish.yml: a step before "Build and pack" rewritesutm_source=githubtoutm_source=nugetin the run's checkout, so the packed copy's sign-up links are tagged for nuget.org. "Check the package" now fails if the packedREADME.mdis missing or still saysutm_source=github.RELEASING.md(step 3) andCHANGELOG.md([Unreleased]) describe both.mainmerged in on 2026-11-09, bringing Fix SaveFileAsync keeping old bytes when it overwrites a longer file #84. The only conflict was inCHANGELOG.md, where both branches had opened## [Unreleased]. It is now one section: Fix SaveFileAsync keeping old bytes when it overwrites a longer file #84'sFixedentry, then oneChangedlist with Fix SaveFileAsync keeping old bytes when it overwrites a longer file #84's two entries first and this PR's two after them.Before and after
main, 510 lines)c:\source\test.docxand saves toc:\dotnet add package ConvertApi, setCONVERTAPI_TOKEN, a 6-line program that converts the hosted sample DOCX to PDF in the current folder; one line each on .NET 10 file-based apps, .NET Framework and ASP.NET Core user secretsC:\output\and line 493 toc:\. In 3.2.2,SaveFilesAsyncnever creates folders, so these throw unless the folder exists, and always on macOS and Linuxoutputfolder that it creates withDirectory.CreateDirectory. 3.2.2, the versiondotnet add package ConvertApiinstalls today, needs that line. With #84,SaveFilesAsynccreates the folder itself, and the line is harmlessusing ConvertApiDotNet;or aconvertApiobjectProgram.csProcessedFile[] files = result.Files;(the type is nowConvertApiFile) andSaveFilesAsyncwithoutawaitConvertApiFile[], awaited, plus saving one file, reading a stream andDeleteFilesAsyncconvert.GetUserAsync(): no such variableconvertApi.GetUserAsync()ScaleImageandScaleProportions, which pdf-to-jpg ignoresFitToSizewithImageWidthandImageHeight: the thumbnail fits in 300 x 300 (231 x 300 on the test PDF)pdfa2bhere,pdfa2in the NuGet README. The API rejectspdfa2with 400 Bad RequestpdfA2b, spelled as in the API specwebtopdf,pdftowatermark,anytozip, andRotatePagefor rotation. None of these is in the current API spec at https://v2.convertapi.com/info/openapi (the first three still work on staging; the rotate parameter isAngle, default 90)htmltopdfwithUrl,text-watermark,filetozip,AngleArgumentNullExceptionwhen the variable is not set/a/authenticationReturnUrllands new users and signed-in customers on their tokens. Tags are top-level, not insideReturnUrl/blob/URL/tree/link to the Examples folder, then per-file links#more-examples) and its per-file links from #81 are kept; the/tree/link is goneDeleteFilesAsync, encryption, server locations, compliance, status and support links/doc/...links that redirect/docs/...URLsConvertApi/docs/README.md: H1 "ConvertAPI NuGet Package", "C#" 0 times, no example links,pdfa2utm_source=nugetAll links are absolute https URLs, except in-page anchors. nuget.org renders those too: its current page has heading ids and working
#...links. The badges use img.shields.io, which nuget.org allows. The README is plain ASCII and uses no HTML.Tested snippets
Every C# block in the new README was run on macOS with .NET SDK 10.0.401, against the staging API (https://stag-v2.convertapi.com). Each block became
Program.csof a freshdotnet new consoleproject withConvertApi3.2.2 from nuget.org, byte for byte. A separate module-initializer file pointed the SDK at staging, the wayExamples/ConverterCatalogDemosetsApiBaseUri. The output files were then checked withpdfinfo,pdftotext,qpdf,sipsandunzip.All 43 blocks passed:
document.docxdocument.pdfin the current folder (2 pages); prints its full pathApiBaseUrireadshttps://eu-v2.convertapi.comdocument.docxoutput/document.pdf, 2 pages with the document's textpage.htmloutput/page.pdf, A4, with the page's textoutput/invoice.pdfwith "Invoice 1001"output/www_example_com.pdf, title "Example Domain"spreadsheet.xlsxoutput/spreadsheet.pdfdocument.pdf(6 pages)output/document.docxdocument.pdfdocument.jpg,document-2.jpg...document-6.jpgdocument.pdfdocument.pdf, 1,086,060 bytespage.htmloutput/page.docxwith the page's headingpresentation.pptximage.jpgdocument.pdfbook.epubemail.emloutput/email.pdffirst.pdf(6 pages),second.pdf(1)document.pdfdocument.pdfdocument.pdfdocument.pdfform.pdf, 19 form fieldsqpdf --checkcleandocument.pdfdocument.pdfdocument.pdfoutput/document.pdf, 6 pagesdocument.pdfdocument.pdfwith an authordocument.pdfoutput/document.xlsxdocument.pdfform.pdfoutput/form.fdfemail.emltemplate.docxwith{{name}}original.docx,revised.docxdocument.pdf,document.docxoutput/document.zipwith both filesdocument.pdffirst-page.jpgsaved, server files deletedpresentation.pptxdocument.pdfoutput/document.jpg, 231 x 300 pixelsdocument.docxoutput/document.pdf; with an invalid token it prints the 401 lineAlso run:
#:package ConvertApi@*plus the quick start, with one test-only line pointing at staging, saveddocument.pdf.#:package ConvertApiwithout a version fails with NU1015, so the note says@*.dotnet new web,dotnet user-secrets init,dotnet user-secrets set ConvertApi:Token ...andnew ConvertApi(builder.Configuration["ConvertApi:Token"])converted a file on staging.setfails withoutinit, so the note has both.static async Task Main(), withusing System;andusing System.Threading.Tasks;, compiles fornet48with C# 7.3. Not run: there is no Mono on this Mac..docfile with"docx"converts;"png"in place of"jpg"gives PNG pages; an.msgfile with"eml"converts; non-ASCII text in the HTML string survives without a<meta charset>;DeleteFilesAsyncdeleted 7 files (6 results and the upload); an invalid token prints401 Unauthorized: {"Code":4011,"Message":"Unauthorized. Invalid or missing API credentials."}.main, with Fix SaveFileAsync keeping old bytes when it overwrites a longer file #84: after the merge, the library was packed from this branch as3.3.0-local.pr83into a local feed, and all 43 blocks were run again on staging against it. All 43 passed, and every output check matched the 3.2.2 run. The merged tree also passes thebuildcheck's steps: restore, a build of all 23 projects, the 4 unit tests and pack. Its only 3 warnings come from two examples this PR does not touch (ConverterCatalogDemo,GetConverterInfoDemo).Package
dotnet pack:README.mdsits at the package root, byte-identical to the repository'sREADME.md, and the nuspec has<readme>README.md</readme>. The NU5048PackageIconUrlwarning was already there; 3.3.0 replaces the icon.utm_source=nuget, and the new check passes. The check fails (exit 1) on a package packed without the retag, and on one without a README.main, the pack result is the same:README.mdat the package root, byte-identical to the repository's.Not in this PR
mainyet: the SDK readingCONVERTAPI_TOKEN, clearer 401 and 403 messages, the package icon. Two of the planned fixes,SaveFilesAsynccreating its folder andSaveFileAsyncreplacing a longer file, are onmainsince Fix SaveFileAsync keeping old bytes when it overwrites a longer file #84.web(ConvertUrlToPdf),watermarkandwatermark-overlay(WatermarkPdf),jpgtozip(Workflow).webandwatermarkstill work on staging; the other two were not tried.CreatePdfThumbnailis fixed in PDF thumbnail example: fix the comment, keep the thumbnail inside 300x300 #82.🤖 Generated with Claude Code